<template>
    <div style="width: 100%;height: 100%;position: relative">
        <Spin size="large" fix v-if="Loading"></Spin>
        <div class="center">
            <Form :label-width="180" ref="formValidate" :model="formValidate" id="form"
                  :rules="ruleValidate">
                <table>
                    <tr>
                        <td colspan="2">
                            <Form-item label="家庭人员信息:">
                                <span style="padding-right: 20px">{{information}}</span>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <Form-item label="家庭月基础收入金额:" prop="ssca0044">
                                <Input v-model="formValidate.ssca0044" placeholder="请输入家庭月基础收入金额" :disabled="true"
                                />
                            </Form-item>
                        </td>
                        <td>
                            <Form-item label="总保障金额:" prop="ssca0026">
                                <InputNumber :min="0" v-model="formValidate.ssca0026" placeholder="请输入总保障金额"
                                             style="width: 300px"
                                />
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <Form-item label="家庭人口数:" prop="ssca0051">
                                <Input v-model="formValidate.ssca0051" placeholder="请输入家庭人口数" :disabled="true"
                                       class="input"/>
                            </Form-item>
                        </td>
                        <td>
                            <Form-item label="保障人口数:" prop="ssca0052">
                                <Input v-model="formValidate.ssca0052" placeholder="请输入保障人口数" :disabled="true"
                                       class="input"/>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 50%">
                            <Form-item label="开户银行名称:" prop="ssca0009">
                                <c-dict-select v-model="formValidate.ssca0009" dictCode="bankcategoryls"
                                               :width="300"/>
                            </Form-item>
                        </td>
                        <td v-if="formValidate.ssca0009!='999'">
                            <Form-item label="是否代领:" prop="ssca0082">
                                <Select v-model="formValidate.ssca0082" @on-change="changeSsca0082">
                                    <Option value="1">是</Option>
                                    <Option value="0">否</Option>
                                </Select>
                            </Form-item>
                        </td>
                    </tr>
                    <tr v-if="formValidate.ssca0009!='999'">
                        <td style="width: 50%">
                            <Form-item label="开户人姓名:" prop="ssca0010">
                                <Input v-model="formValidate.ssca0010" placeholder="请输入开户人姓名"
                                       v-if="formValidate.ssca0082=='1'"/>
                                <Select v-model="formValidate.ssca0010"
                                        v-else>
                                    <Option v-for="item in memberList" :value="item.azcp0003" :key="item.azcp0001"
                                            @click.native="changeSsca0010(item.azcp0001)">{{item.azcp0003}}
                                    </Option>
                                </Select>
                            </Form-item>
                        </td>
                        <td>
                            <Form-item label="开户人证件号码:" prop="ssca0083">
                                <Input v-model="formValidate.ssca0083" placeholder="请输入开户人证件号码"
                                       :disabled="formValidate.ssca0082!='1'" maxlength="32" @on-blur="formValidate.ssca0083=formValidate.ssca0083.replace(/[^\d]/g,'')"/>
                            </Form-item>
                        </td>
                    </tr>
                    <tr v-if="formValidate.ssca0009!='999'">
                        <td style="width: 50%">
                            <Form-item label="银行账号:" prop="ssca0011">
                                <Input v-model="formValidate.ssca0011" placeholder="请输入银行账号" maxlength="32"
                                       @on-blur="formValidate.ssca0011=formValidate.ssca0011.replace(/[^\d]/g,'')"/>
                            </Form-item>
                        </td>
                        <td>
                            <Form-item label="银行帐号确认录入:" prop="ssca0011_again">
                                <Input v-model="formValidate.ssca0011_again" placeholder="请输入银行账号" maxlength="32"/>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <Form-item label="致贫原因:" prop="ssca0013">
                                <c-dict-select v-model="formValidate.ssca0013" dictCode="poorreason" :width="300"/>
                            </Form-item>
                        </td>
                        <td>
                            <Form-item label="申请时间:" prop="ssca0003">
                                <DatePicker type="date" v-model="formValidate.ssca0003" placeholder="请选择申请时间"
                                            class="input" :editable="false"></DatePicker>
                            </Form-item>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <Form-item label="救助申请理由:" prop="ssca0008">
                                <c-text-area v-model="formValidate.ssca0008" :max-length="100" :row=3
                                             placeholder="请填写救助申请理由"/>
                            </Form-item>
                        </td>
                    </tr>
                </table>
            </Form>
        </div>
        <div id="buttondiv">
            <Button @click="prevStep"> 上一步</Button>
            <Button type="primary" @click="nextStep" style="margin-left: 10px">提交申请</Button>
        </div>
    </div>
</template>

<script>
    import {getAction, postAction} from '@/api/request'
    import {CommonMixin} from '@/views/common/js/CommonMixin'
    import {application12} from './js/application12'

    export default {
        name: "application12",
        mixins: [CommonMixin, application12],
        components: {},
        data() {
            return {}
        },
        methods: {},
        created() {
            this.Loading = true;
            this.formValidate.ssca0026 = null;
            this.getMemberList();
            this.getTab12Infor();
        }
    }
</script>

<style scoped src="@/views/common/css/application12.css">
    /deep/ .ivu-input-number {
        width: 300px;
    }
</style>
